package Disizhou;

public class Digui_1 {
    public static void main(String[] args) {
        int res;
        res=result(5);
        System.out.println("5的阶乘"+res);
    }

    public static int result(int n){
      int res;
        if (n==1){
            res=1;
        }else {
            res=result(n-1)*n;
        }
        return res;
    }
}
